package cn.gjculture.shopping.api.dao;

import cn.gjculture.shopping.api.entity.Role;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleDao {

    @Insert("insert into role(roleId,roleName,insertTime,updateTime,status) " +
            "values(#{roleId},#{roleName},#{insertTime},#{updateTime},#{status})")
    int insert(Role role);

    @Select("select * from role")
    List<Role> query();

    @Select("select * from role where roleId=#{roleId}")
    Role queryById(String roleId);
}
